const testRoute = require("./users");
const { verifyToken, setUnprotectedRoutes } = require("../utils");

const Router = require("koa-router");
const router = new Router({ prefix: "/api" });

const unprotectedRoutes = ["/api/user/login"];

setUnprotectedRoutes(unprotectedRoutes);
router.use(verifyToken);
router.use(testRoute.routes());
router.use(testRoute.allowedMethods());

module.exports = router;
